<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String odetailNo = request.getParameter("odetailno");
%>

<!-- header -->
	<jsp:include page="../include/header.jsp"></jsp:include>
	<header id="header">	
	<!--header-->
	<jsp:include page="../include/header_top.jsp"></jsp:include>	
	<!--/header_top-->	
	<!--/header-middle-->
	<jsp:include page="../include/header_middle.jsp"></jsp:include>		
	<!--header-bottom-->
	<jsp:include page="../include/header_bottom.jsp"></jsp:include>	
	<!--/header-bottom-->	
	</header>	
<!--/header-->


<script type="text/javascript">
$(function(){
	var odetailno = "";
	
	if(location.search){
		odetailno = location.search.split("?")[1];
		odetailno = odetailno.split("=")[1];
	}
	else{
		location.href="/";
	}
	
	$.getJSON('ordersDetailsJSON',
			{odetailno : odetailno}, 
			function(odetailJsonArray){
				var html = ""; 
				
				html += "<table>";
				
				$.each(odetailJsonArray, function(index, odetailJson){
					html += "<tr>";
					html += "<td>주문번호</td>";
					html += "<td>" + odetailJson.odetail_no + "</td>";
					html += "</tr>";
					
					html += "<tr>";
					html += "<td>상세번호</td>";
					html += "<td>" + odetailJson.odetail_ordersno + "</td>";
					html += "</tr>";
					
					html += "<tr>";
					html += "<td>상품번호</td>";
					html += "<td>" + odetailJson.odetail_product + "</td>";
					html += "</tr>";
					
					html += "<tr>";
					html += "<td>수량</td>";
					html += "<td>" + odetailJson.odetail_count + "</td>";
					html += "</tr>";
					
				});
				
				html += "</table>";
				
				$('#odetail_info').html(html);
			}
		 );
});
</script>

<div id="odetail_info"></div>



<!--Footer-->
	<jsp:include page="../include/footer.jsp"></jsp:include>
<!--/Footer-->
